$(document).ready(function(){
	
	//GENERIQUE --------------------------------------------------------------------------------------------------------------------------------------------
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	MakeFormAction();
	
	//SPECIFIQUE -------------------------------------------------------------------------------------------------------------------------------------------
	//------------------------------------------------------------------------------------------------------------------------------------------------------
		
	
	if($("#IndivReg").length){
		$("#IndivReg").click(function(){
			 document.location.href='/_Customer/RegIndiv1.php';
		});
	}
	
	if($("#GroupReg").length){
		$("#GroupReg").click(function(){
			 document.location.href='/_MyEcf/MyEcfLogin.php';
		});
	}
	
	if($(".GroupLinkInfo").length){
		$(".GroupLinkInfo").click(function(){
			 document.location.href='/_Group/MyEcfInfoGr.php';
		});
	}
	
	if($(".GroupLinkManage").length){
		$(".GroupLinkManage").click(function(){
			 document.location.href='/_Group/MyEcfManageGr.php';
		});
	}
	
	if($(".NoChangeGr").length){
		$(".NoChangeGr").click(function(){
			 document.location.href='/_Group/MyEcfGr.php';
		});
	}
	
	if($(".NoChangeSpeaker").length){
		$(".NoChangeSpeaker").click(function(){
			 document.location.href='/_Speaker/MyEcfSpeaker.php';
		});
	}
	
	if($(".NoChangeExh").length){
		$(".NoChangeExh").click(function(){
			 document.location.href='/_Exhibitor/MyEcfExh.php';
		});
	}
	
	if($(".ExhibitorLinkInfo").length){
		$(".ExhibitorLinkInfo").click(function(){
			 document.location.href='/_Exhibitor/MyEcfInfoExh.php';
		});
	}
	
	if($(".ExhibitorLinkTech").length){
		$(".ExhibitorLinkTech").click(function(){
			 document.location.href='/_Exhibitor/MyEcfTechExh.php';
		});
	}
	
	if($(".ExhibitorLinkFiles").length){
		$(".ExhibitorLinkFiles").click(function(){
			 document.location.href='/_Exhibitor/MyEcfFilesExh.php';
		});
	}
	
	if($(".SpeakerLinkFiles").length){
		$(".SpeakerLinkFiles").click(function(){
			 document.location.href='/_Speaker/MyEcfFilesSpeaker.php';
		});
	}
	
	if($(".ExhibitorLinkManage").length){
		$(".ExhibitorLinkManage").click(function(){
			 document.location.href='/_Exhibitor/MyEcfManageExh.php';
		});
	}
	
	if($(".ExhibitorLinkOrders").length){
		$(".ExhibitorLinkOrders").click(function(){
			 document.location.href='/_Exhibitor/MyEcfOrdersExh.php';
		});
	}
	
	if($(".MyEcfLink").length){
		$(".MyEcfLink").click(function(){
			 document.location.href='/_MyEcf/MyEcfLogin.php';
		});
	}
	
	if($(".RegisterLink").length){
		$(".RegisterLink").click(function(){
			 document.location.href='/index.php';
		});
	}
	
	if($(".ContactUs").length){
		$(".ContactUs").click(function(){
			 document.location.href='/ContactUs.php';
		});
	}
	
	if($(".LogOutLink").length){
		$(".LogOutLink").click(function(){
			 document.location.href='/register.php?logout=1';
		});
	}
	
	if($(".MyEcfRegDetail").length){
		$(".MyEcfRegDetail").click(function(){
			 document.location.href='/_MyEcf/MyEcfMod.php';
		});
	}
	
	if($(".MyEcfSpeakerBio").length){
		$(".MyEcfSpeakerBio").click(function(){
			 document.location.href='/_Speaker/MyEcfBioSpeaker.php';
		});
	}
	
	if($(".DisplayInvoice").length){
		$(".DisplayInvoice").click(function(){
			 document.location.href='/_MyEcf/MyInvoice.php';
		});
	}
	
	if($(".NoChange").length){
		$(".NoChange").click(function(){
			 document.location.href='/_MyEcf/MyEcf.php';
		});
	}
	
	if($(".ProceedingsLink").length){
		$(".ProceedingsLink").click(function(){
			document.location.href='/Presentations/Presentations.php';		 
		});
	}
	
	if($(".MyAgendaLink").length){
		$(".MyAgendaLink").click(function(){
			alert('available soon');		 
		});
	}
	
	if($(".AgendaLink").length){
		$(".AgendaLink").click(function(){
	//		document.location.href='http://www.3ds.com/company/events/ecf-2009/agenda/';
			document.location.href='/agenda.php';
		});
	}
	
	if($(".LinkPrevious").length){
		$(".LinkPrevious").click(function(){
			$("#Previous_Form").submit();
		});
	}
	
	
	
	//GESTION EVENEMENT : RegIndiv1.php
	//------------------------------------------------------------------------------------------------------------------------------------------------------

	//Business Activity : gestion du champs Other (disabled au load et au click, activer et afficher au click other) 
	if($(".BusinessActivity").length){
		$(".BusinessActivity").click(function(){
				$('#OtherBusAct').fadeOut("slow");
				$('#InfosDS').fadeOut("slow");
				$('#InfosDS').addClass("invisible");
				$('#FieldOtherBusAct').val("");
				$('#FieldOtherBusAct').attr("disabled","disabled");
		});
	}
	
	if($(".BusinessActivityOther").length){
		$(".BusinessActivityOther").click(function(){
			$('#OtherBusAct').fadeIn("slow");
			$('#InfosDS').fadeOut("slow");
			$('#FieldOtherBusAct').removeAttr("disabled");
		});
	}
	
	
	if($(".DS").length){
		$(".DS").click(function(){
			$('#InfosDS').fadeIn("slow");
			$('#InfosDS').removeClass("invisible");
		});
	}
	//---------------------------------------------------------------------------
	
	
	//Hear About ECF : gestion du champs Other (disabled au load et au choix, activer et afficher au choix other) 
	if($(".HearAbout").length){
		$(".HearAbout").change(function(){
			if($(".HearAbout").val()=='Other'){
				$('#OtherHearAbout').fadeIn("slow");
				$('#HearAbourOther').removeAttr("disabled");
			} else {
				$('#OtherHearAbout').fadeOut("slow");
				$('#HearAbourOther').val("");
				$('#HearAbourOther').attr("disabled","disabled");
				
			}
		});
	}
	//---------------------------------------------------------------------------
	
	
	//Position : gestion du champs Other (disabled au load et au choix, activer et afficher au choix other) 
	if($(".Position").length){
		$(".Position").change(function(){
			if($(".Position").val()=='Other'){
				$('#OtherPos').fadeIn("slow");
				$('#PositionOther').removeAttr("disabled");
				 
			} else {
				$('#OtherPos').fadeOut("slow");
				$('#PositionOther').val("");
				$('#PositionOther').attr("disabled","disabled");
			}
		});
	}
	//---------------------------------------------------------------------------
	
	
	//GESTION EVENEMENT : RegIndiv2.php
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	
	// rechargement Ajax des form Hotel et Billing sur Choix du Registration Pass
	if($(".PassSelected").length){
		$(".PassSelected").click(function(){
			AjaxPassSelected($(this).val());
		});
	}
	
	if($(".CopyForBilling").length){
		$(".CopyForBilling").click(function(){
			CopyForBilling();
		});

	}
	
	if($(".AccommodationNeed").length){
		$(".AccommodationNeed").click(function(){
			MakeDateHotelRequired($(this));
			ControleDateHotel();
		});

	}
	
	
	
	//GESTION EVENEMENT : RegIndiv3.php
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	
	// rechargement Ajax des form Hotel et Billing sur Choix du Registration Pass
	if($(".ActiveModify").length){
		$(".ActiveModify").click(function(){
			 document.location.href='/_Customer/RegIndivMod.php';
		});
	}
	
	if($(".ActiveCancel").length){
		$(".ActiveCancel").click(function(){
			if (confirm('Your registration will be canceled !')){
				document.location.href='/_Customer/RegIndivCanc.php';
			}
		});
	}
	
	
	//GESTION EVENEMENT : RegIndivCanc.php
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	
	// rechargement Ajax des form Hotel et Billing sur Choix du Registration Pass
	if($(".LinkHomePage").length){
		$(".LinkHomePage").click(function(){
			 document.location.href='/index.php';
		});
	}
	
	//GESTION EVENEMENT : IBMView.php & DSView.php & Prospects
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	
	// rechargement Liste
	if($(".IBMViewList").length){
		$(".IBMViewList").click(function(){
			 document.location.href='/backoffice/IBMView.php';
		});
	}
	
	// rechargement Liste
	if($(".DSViewList").length){
		$(".DSViewList").click(function(){
			 document.location.href='/backoffice/DSView.php';
		});
	}
	
	// rechargement Liste
	if($(".DSSpeakersList").length){
		$(".DSSpeakersList").click(function(){
			 document.location.href='/backoffice/DSViewSpeakers.php';
		});
	}
	
	// rechargement Liste
	if($(".DSDocumentsList").length){
		$(".DSDocumentsList").click(function(){
			 document.location.href='/backoffice/DSViewDocuments.php';
		});
	}
	
	// rechargement Liste
	if($(".DSViewSponsorsList").length){
		$(".DSViewSponsorsList").click(function(){
			 document.location.href='/backoffice/DSViewSponsors.php';
		});
	}
	
	// rechargement Liste
	if($(".DSProspectsList").length){
		$(".DSProspectsList").click(function(){
			 document.location.href='/PreRegistration/backoffice/list.php';
		});
	}
	
	if($(".TrDetails").length){
		$(".TrDetails").click(function(){
			
			if($(".ToBeFade").length){
				$(".ToBeFade").fadeOut("normal");
			}
			if($(".ColorToBeChange").length){
				$(".ColorToBeChange").css("background-color", "#FFF");
			}
			$(this).children("td").css("background-color", "#E5772A").addClass("ColorToBeChange");
			$('#'+$(this).attr('TrNext')).fadeIn("normal").addClass("ToBeFade");
		});
	}
	
	
	// rechargement Liste
	if($(".ProceedingsAll").length){
		$(".ProceedingsAll").click(function(){
			 document.location.href='/Presentations/Presentations.php';
		});
	}
	
	//GESTION AGENDA
	//------------------------------------------------------------------------------------------------------------------------------------------------------
	if($(".agendaday1").length){
		$(".agendaday1").click(function(){
			 document.location.href='/Agenda/17.php';
		});
	}
	if($(".agendaday2").length){
		$(".agendaday2").click(function(){
			 document.location.href='/Agenda/18.php';
		});
	}
	if($(".agendaprint").length){
		$(".agendaprint").click(function(){
			 document.location.href='/Agenda/print.php';
		});
	}

//FIN DE DOC READY	
  });